package Eyjafjalla.action;

import Eyjafjalla.helper.EyjafjallaHelper;
import Eyjafjalla.patch.CloudPatch;
import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.actions.common.DrawCardAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;

import java.util.Iterator;

public class InDamageAfterDrawAction extends AbstractGameAction {
    public InDamageAfterDrawAction(boolean isCloud, int amt) {
        this.amount = amt;
        this.isCloud = isCloud;
    }

    boolean isCloud;

    @Override
    public void update() {
        if (!isCloud) {
            if (DrawCardAction.drawnCards.size() > 0) {
                for (AbstractCard c : DrawCardAction.drawnCards) {
                    EyjafjallaHelper.IncreaseCard(c, this.amount, 0, 0, 0);
                }
            }
        } else if (DrawCloudAction.drawnCards.size() > 0) {
            for (AbstractCard c : DrawCloudAction.drawnCards) {
                EyjafjallaHelper.IncreaseCard(c, this.amount, 0, 0, 0);
            }
        }
        this.isDone = true;
    }
}
